package com.soft.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Data
//有参无参构造
//@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Goods {
    private int gid;
    private String name;
    private Date date;
    private Shop shop;

    public Goods(int gid, String name, Shop shop) {
        this.gid = gid;
        this.name = name;
        this.shop = shop;
        //默认的创建日期实现
        this.date = new Date();
    }
}
